A Logical Analysis of Framing for Specifications with Pure Method Calls
نویسندگان
چکیده
For specifying and reasoning about object-based programs it is often attractive for contracts to be expressed using calls to pure methods. It is useful for pure methods to have contracts, including read effects to support local reasoning based on frame conditions. This leads to puzzles such as the use of a pure method in its own contract. These ideas have been explored in connection with verification tools based on axiomatic semantics, guided by the need to avoid logical inconsistency, and focusing on encodings that cater for first order automated provers. This paper adds pure methods and read effects to region logic, a firstorder program logic that features frame-based local reasoning and a proof rule for linking of clients with modules to achieve end-to-end correctness by modular reasoning. Soundness is proved with respect to a conventional operational semantics and using the extensional (i.e., relational) interpretation of read effects.
منابع مشابه
An Automatic Verifier for Java-Like Programs Based on Dynamic Frames
Data abstraction is crucial in the construction of modular programs, since it ensures that internal changes in one module do not propagate to other modules. In object-oriented programs, classes typically enforce data abstraction by providing access to their internal state only through methods. By using method calls in method contracts, data abstraction can be extended to specifications. In this...
متن کاملObservational Purity and Encapsulation
Practical specification languages for imperative and object-oriented programs, such as JML, Eiffel, and Spec#, allow the use of program expressions including method calls in specification formulas. For coherent semantics of specifications, and to avoid anomalies with runtime assertion checking, expressions in specifications and assertions are typically required to be weakly pure in the sense th...
متن کامل99.44% pure: Useful Abstractions in Specifications
Specification languages that use the same expression language as the implementation language must deal with whether or not to permit functional abstraction, i.e., method calls in specification expressions. The difficulty is that a specification must not change the functional behavior of the associated program. There are three main current approaches: a) forbid the use of functions in specificat...
متن کاملAnalyzing Framing Processes By Means Of Logical Argument Mapping
The primary goal of this chapter is to present a new method—called Logical Argument Mapping (LAM)—for the analysis of framing processes. To justify this approach, I start with a distinction between boundary setting, sensemaking, and meaning construction as three forms or aspects of framing, and argue that crucial for the resolution of framebased controversies is our ability to deal with entire ...
متن کاملReasoning About Method Calls in Interface Specifications
class Inconsistent { /*@ normal_behavior @ ensures \result == 0 && @ \result == 1; @*/ /*@ pure @*/ abstract int wrong(); /*@ normal_behavior @ assignable \nothing; @ ensures \result == 6 + wrong() && @ \result == 5 + wrong(); @*/ int bar() { return 6; } } Figure 6: The specification of wrong is not satisfiable. theory used to verify methods that use m in their specification. If this background...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014